package com.wedimob.task;

public class HelloWorld extends Task<String, String> {

	public HelloWorld(String input) {
		super(input);
	}

	@Override
	protected int runcost() throws Throwable {
		return 1;
	}

	@Override
	protected void runtask() throws Throwable {
		System.out.println(input);
	}

	public static void main(String[] args) {
		HelloWorld task = new HelloWorld("Hello world 1");
		task.then(new HelloWorld("Hello world 2a"), new HelloWorld("Hello world 2b"), new HelloWorld("Hello world 2c"));
		task.then(new HelloWorld("Hello world 3"));
		task.before(new HelloWorld("Hello world 0"));
		new Thread(task.root()).start();
	}
}
